Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/ClusterMembersDialog.kt renovate/fastlane-2.x-lockfile (056eed64) Text, 3.60 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.map.component

Tff7b72import T7ee787androidx.compose.foundation.clickable
Tff7b72import T7ee787androidx.compose.foundation.layout.PaddingValues
Tff7b72import T7ee787androidx.compose.foundation.layout.fillMaxWidth
Tff7b72import T7ee787androidx.compose.foundation.layout.heightIn
Tff7b72import T7ee787androidx.compose.foundation.layout.padding
Tff7b72import T7ee787androidx.compose.foundation.lazy.LazyColumn
Tff7b72import T7ee787androidx.compose.foundation.lazy.items
Tff7b72import T7ee787androidx.compose.material3.AlertDialog
Tff7b72import T7ee787androidx.compose.material3.ListItem
Tff7b72import T7ee787androidx.compose.material3.Text
Tff7b72import T7ee787androidx.compose.material3.TextButton
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.Modifier
Tff7b72import T7ee787androidx.compose.ui.unit.dp
Tff7b72import T7ee787org.jetbrains.compose.resources.stringResource
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.close
Tff7b72import T7ee787org.meshtastic.core.resources.nodes_at_this_location
Tff7b72import T7ee787org.meshtastic.core.ui.component.NodeChip

T8b949e/**
* Lists the nodes sharing one spot, when zooming in further will not separate them.
*
* Renders nothing when [members] is empty, so callers can hand it state directly without a guard.
*/
Tf0883e@Composable
Tff7b72fun Td2a8ffClusterMembersDialogTb4b4b4(
Te6edf3membersTb4b4b4: Te6edf3ListTff7b72<Te6edf3ClusterMemberEntryTff7b72>Tb4b4b4,
Te6edf3onMemberClickTb4b4b4: Tb4b4b4(Tffa657IntTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onDismissRequestTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3modifierTb4b4b4: Te6edf3Modifier Tff7b72= Te6edf3ModifierTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72if Tb4b4b4(Te6edf3membersTb4b4b4.Te6edf3isEmptyTb4b4b4(Tb4b4b4)Tb4b4b4) Tff7b72return

Te6edf3AlertDialogTb4b4b4(
Te6edf3onDismissRequest Tff7b72= Te6edf3onDismissRequestTb4b4b4,
Te6edf3modifier Tff7b72= Te6edf3modifierTb4b4b4,
Te6edf3title Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3text Tff7b72= Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3nodes_at_this_locationTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3text Tff7b72= Tb4b4b4{
Te6edf3LazyColumnTb4b4b4(Te6edf3contentPadding Tff7b72= Te6edf3PaddingValuesTb4b4b4(Te6edf3vertical Tff7b72= T79c0ff8.Te6edf3dpTb4b4b4)Tb4b4b4) Tb4b4b4{
T8b949e// Deduped by node number: it is the key and must be unique, and a node can reach the map from two
T8b949e// sources, or arrive as a `num = 0` placeholder.
Te6edf3itemsTb4b4b4(Te6edf3items Tff7b72= Te6edf3membersTb4b4b4.Te6edf3distinctBy Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3nodeNum Tb4b4b4}Tb4b4b4, Te6edf3key Tff7b72= Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3nodeNum Tb4b4b4}Tb4b4b4) Tb4b4b4{ Te6edf3member Tff7b72-Tff7b72>
Te6edf3ClusterMemberRowTb4b4b4(Te6edf3member Tff7b72= Te6edf3memberTb4b4b4, Te6edf3onClick Tff7b72= Tb4b4b4{ Te6edf3onMemberClickTb4b4b4(Te6edf3memberTb4b4b4.Te6edf3nodeNumTb4b4b4) Tb4b4b4}Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}Tb4b4b4,
Te6edf3confirmButton Tff7b72= Tb4b4b4{ Te6edf3TextButtonTb4b4b4(Te6edf3onClick Tff7b72= Te6edf3onDismissRequestTb4b4b4) Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3stringResourceTb4b4b4(Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3closeTb4b4b4)Tb4b4b4) Tb4b4b4} Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffClusterMemberRowTb4b4b4(Te6edf3memberTb4b4b4: Te6edf3ClusterMemberEntryTb4b4b4, Te6edf3onClickTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Te6edf3ListItemTb4b4b4(
Te6edf3leadingContent Tff7b72= Te6edf3memberTb4b4b4.Te6edf3nodeTff7b72?.Te6edf3let Tb4b4b4{ Tb4b4b4{ Te6edf3NodeChipTb4b4b4(Te6edf3node Tff7b72= Tffa657itTb4b4b4) Tb4b4b4} Tb4b4b4}Tb4b4b4,
Te6edf3headlineContent Tff7b72= Tb4b4b4{ Te6edf3TextTb4b4b4(Te6edf3memberTb4b4b4.Te6edf3titleTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3supportingContent Tff7b72= Tb4b4b4{ Tff7b72if Tb4b4b4(Te6edf3memberTb4b4b4.Te6edf3subtitleTb4b4b4.Te6edf3isNotBlankTb4b4b4(Tb4b4b4)Tb4b4b4) Te6edf3TextTb4b4b4(Te6edf3memberTb4b4b4.Te6edf3subtitleTb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3modifier Tff7b72=
Te6edf3ModifierTb4b4b4.Te6edf3fillMaxWidthTb4b4b4(Tb4b4b4)
T8b949e// A member with only one line of text lands under the minimum touch target without this.
Tb4b4b4.Te6edf3heightInTb4b4b4(Te6edf3min Tff7b72= Te6edf3MIN_TOUCH_TARGETTb4b4b4.Te6edf3dpTb4b4b4)
Tb4b4b4.Te6edf3clickableTb4b4b4(Te6edf3onClick Tff7b72= Te6edf3onClickTb4b4b4)
Tb4b4b4.Te6edf3paddingTb4b4b4(Te6edf3horizontal Tff7b72= T79c0ff8.Te6edf3dpTb4b4b4, Te6edf3vertical Tff7b72= T79c0ff4.Te6edf3dpTb4b4b4)Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

T8b949e/** Material's minimum touch target, matching the 48dp the shared nav display uses. */
Tff7b72private Tff7b72const Tff7b72val Te6edf3MIN_TOUCH_TARGET Tff7b72= T79c0ff4T79c0ff8

Served by rngit 1.5.2 - Generated in 0.08s